<template>
	<pop-manager :show="show" :type="type" :overlay="overlay" @clickmask="handleMaskClick"><slot></slot></pop-manager>
</template>

<script>
import popManager from '@/components/pop-manager/index.vue';
export default {
	components: { popManager },
	props: {
		show: {
			type: Boolean,
			default: false
		},

		overlay: {
			type: Boolean,
			default: true
		},

		closeOnClickOverlay: {
			type: Boolean,
			default: true
		},

		// 弹出方向
		type: {
			type: String,
			default: 'center'
		}
	},
	data() {
		return {};
	},
	mounted() {
		console.log(this.overlay);
	},
	methods: {
		handleMaskClick() {
			this.$emit('click-overlay', {});

			if (!this.closeOnClickOverlay) {
				return;
			}
			this.$emit('close', {});
		}
	}
};
</script>

<style></style>
